#define _CRT_SECURE_NO_WARNINGS
#include <iostream>
#include <vector>

using namespace std;

class Solution {
public:
    vector<vector<int>> ret;
    vector<int> path;

    vector<vector<int>> subsets(vector<int>& nums) {
        dfs1(nums, 0);
        return ret;
    }

    void dfs1(vector<int>& nums, int pos)
    {
        ret.push_back(path);
        for (int i = pos; i < nums.size(); i++)
        {
            path.push_back(nums[i]);
            dfs1(nums, i + 1);
            path.pop_back();
        }
    }
};

int main()
{
    Solution s;
    vector<int> nums = { 1,2,3 };
    s.subsets(nums);

	return 0;
}